Skip to content

This pull request introduces several database schema migrations for the prospects table, focusing on cleaning up unused or redundant columns and standardizing column names.#79

Merged
goldlabelapps merged 2 commits into
masterfrom
staging
Apr 9, 2026

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

@goldlabelapps goldlabelapps commented Apr 9, 2026

For each migration, both SQL scripts and corresponding Python scripts to execute the migrations are added.

Schema cleanup and column removal:

  • Dropped unused columns from the prospects table, including mobile_phone, other_phone, other_photne (likely a typo), subsidiary_of, and subsidiary_of_organization_id. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Column additions and population:

  • Added a new name column to the prospects table and populated it by concatenating first_name and last_name. [1] [2]

Column renaming for consistency:

  • Renamed person_linkinkedin_url (and/or person_linkedin_url) to linkedin for clarity and consistency. [1] [2] [3]
  • Renamed sub_departments to department to standardize naming. [1] [2]

Each migration has an associated Python script to apply the change using the database connection utility.

Add SQL migration files and small runner scripts to modify the prospects table. New SQL files drop columns other_photne, subsidiary_of, and subsidiary_of_organization_id, and rename sub_departments and two variants of the person LinkedIn column to linkedin. Corresponding Python runners (using app.utils.db.get_db_connection_direct) execute each ALTER statement and commit the change. Note: both spelled variants of the LinkedIn column and a misspelled other_photne file are included to handle existing inconsistencies.
Add SQL migrations to modify the prospects table: add a nullable name column and populate it from first_name + last_name, and remove mobile_phone and other_phone columns. Include Python runner scripts that execute these migrations using app.utils.db.get_db_connection_direct. SQL uses IF NOT EXISTS / IF EXISTS to make the changes idempotent.
@goldlabelapps goldlabelapps changed the title Staging This pull request introduces several database schema migrations for the prospects table, focusing on cleaning up unused or redundant columns and standardizing column names. Apr 9, 2026
@goldlabelapps goldlabelapps merged commit 1f0883e into master Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant